<?php
/*
??????????
??????????
*/

class Roles_model extends CI_Model{

    public function __construct(){
        $this->load->database();
    }

    public function listAll(){
        return $this->db->get('roles');
    }

    public function initRoles(){
        $roles = array(
            array(
                'id' => 1,
                'name' => 'student'
            ),
            array(
                'id' => 2,
                'name' => 'teacher'
            )
        );
        $this->db->insert_batch('roles',$roles);
    }



}

?>